package com.taxi.service;

import com.taxi.dto.PriceRule;
import com.taxi.remote.ServicePriceClient;
import com.taxi.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PriceRuleService {

    @Autowired
    private ServicePriceClient servicePriceClient;

    public Result getRulesList(int page, int limit, String cityCode){
        return servicePriceClient.getRulesList(page,limit,cityCode);
    }

    public Result addRules(PriceRule priceRule){
        return servicePriceClient.add(priceRule);
    }

    public Result editRules(PriceRule priceRule){
        return servicePriceClient.edit(priceRule);
    }
}
